<template>
  <q-dialog ref="dialogRef" @hide="onDialogHide">
    <q-card class="q-dialog-plugin">
      <q-card-section class="flex items-center">
        <q-item-label> 续费 </q-item-label>
        <q-space />
        <q-btn color="grey" dense flat icon="close" @click="onCancelClick" />
      </q-card-section>
      <q-card-actions>
        <q-btn color="primary" label="OK" @click="onOKClick" />
        <q-btn color="primary" label="Cancel" @click="onCancelClick" />
      </q-card-actions>
    </q-card>
  </q-dialog>
</template>

<script>
import { useDialogPluginComponent } from "quasar";
import { api } from "src/boot/axios";
import { reactive } from "vue";

export default {
  emits: [...useDialogPluginComponent.emits],
  props: {
    accounts_id: Number,
  },
  setup() {
    const { dialogRef, onDialogHide, onDialogOK, onDialogCancel } =
      useDialogPluginComponent();

    const data = reactive({
      list: [],
    });

    api.get("products/index?type=1").then((res) => {
      data.list = res;
    });
    return {
      dialogRef,
      onDialogHide,
      onOKClick() {
        onDialogOK();
      },
      onCancelClick: onDialogCancel,
    };
  },
};
</script>
